<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #f0f0f0;
            margin: 0;
            padding: 0;
        }
        .clock {
            font-size: 48px;
        }
    </style>
</head>
<body>
    <div class="clock" id="clock"></div>

    <script>
        function updateClock() {
            const now = new Date();

            const year = now.getFullYear();
            const month = String(now.getMonth() + 1).padStart(2, '0');
            const date = String(now.getDate()).padStart(2, '0');
            const hours = String(now.getHours()).padStart(2, '0');
            const minutes = String(now.getMinutes()).padStart(2, '0');
            const seconds = String(now.getSeconds()).padStart(2, '0');

            const clockElement = document.getElementById('clock');
            clockElement.textContent = `${year}年${month}月${date}日 ${hours}:${minutes}:${seconds}`;
        }

        // 每秒更新一次时钟
        setInterval(updateClock, 1000);

        // 页面加载时初始化时钟
        updateClock();
    </script>
</body>
</html>